package adapter.practice_06;

/**
 * @author yi qiang
 * @date 2021/9/10 0:59
 */
public class Player {
    public static void main(String[] args) {
        System.out.println("接口适配器模式: 使用组合来得到不兼容的功能");
        IosPhone iosPhone = new IPhone11();
        AndroidPhoneAdapter androidPhoneAdapter = new AndroidPhoneAdapter(iosPhone);
        androidPhoneAdapter.play();

        System.out.println("\n类适配器模式: 使用继承来得到不兼容的功能");
        AndroidPhoneAdapter2 androidPhoneAdapter2 = new AndroidPhoneAdapter2();
        androidPhoneAdapter2.play();

    }
}
